If an error condition occurs, this routine returns an integer
value indicating the type of error. If the routine's exception
object argument is a status exception, it sets the code argument
and returns zero (0). Possible return values are as follows:
Return Description
0 Successful completion.
[EINVAL] The exception argument is not a valid status
exception object.